import numpy as np
from tqdm import tqdm

path = 'F:\\LCW\\PycharmProject\\pytorch-learn\\RecSys\\dataset\\kgofpatent-100k-tendency\\patent-100k-tendency.txt'

with open(path,'r')  as f:
    data = f.readlines()
    itemlist = []
    for line in tqdm(data):
        user = line.split('\t')[0]
        item = line.split('\t')[1]
        if int(item) not in itemlist:
            itemlist.append(int(item))

    print(itemlist)
    print(len(itemlist))